home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_100 / 108_01 / compress.doc < prev    next >
Text File  |  1985-11-13  |  2KB  |  67 lines

  1.  
  2.     compress.doc    Version 2.3
  3.             15-Aug-80
  4.  
  5.     this program compresses/expands any valid ASCII text
  6.     file. the CP/M CRLF sequence is replaced by NL, and
  7.     strings of identical characters of greater than 3 bytes
  8.     are reduced to 3 bytes in the following format:
  9.  
  10.         byte 1:    repeat code    RCODE    000Q
  11.         byte 2: repeat count    cntr    ---Q
  12.         byte 3:    character    c    ---Q
  13.  
  14.     in addition, the most common key-words of various
  15.     languages (BASIC, ASSEMBLER, FORTRAN, etc.), as
  16.     well as a number of miscellaneous strings, are
  17.     tokenized to 1 byte. the average total disk space
  18.     saved is approximately 20%. processing time is
  19.     approximately 30" for a 10K file with read-after-
  20.     write (RAW) in a 40K system.
  21.  
  22.     considerable protection has been built in to avoid
  23.     such disasters as compressing a compressed file or
  24.     expanding an ordinary file. the following chart
  25.     summarizes legal and illegal modes:
  26.  
  27.     normal file    <----------------->    compressed file
  28.  
  29.         /C                        /E
  30.  
  31.     .ASM    --->    assembler source    <---    .$AS
  32.     .BAS    --->    CBASIC source        <---    .$BA
  33.     .C    --->    C source        <---    .$C
  34.     .COB    --->    COBOL source        <---    .$CO
  35.     .DAT    --->    general data file    <---    .$DA
  36.     .DOC    --->    general documentation    <---    .$DO
  37.     .FOR    --->    FORTRAN source        <---    .$FO
  38.     .LIB    --->    library source        <---    .$LI
  39.     .MAC    --->    macro-assembler source    <---    .$MA
  40.     .MBA    --->    MBASIC source             <---    .$MB
  41.             (requires verification)
  42.     .RAT    --->    RATFOR source        <---    .$RA
  43.     .SRC    --->    PASCAL source        <---    .$SR
  44.     .TXT    --->    general text file    <---    .$TX
  45.             (requires verification)
  46.  
  47.     all other operations are considered illegal and the
  48.     program will abort. note that all files which have
  49.     been processed with earlier versions of COMPRESS will
  50.     be handled correctly by this version and any future
  51.     versions will be upward-compatible.
  52.  
  53.     the supplied version requires a minimum of 40K in
  54.     which to operate. note also that there must be 
  55.     sufficient space on the disk to hold both the
  56.     compressed and normal files during processing. upon
  57.     successful completion, the original file (normal
  58.     in the case of compression - compressed in the case
  59.     of expansion) is deleted.
  60.  
  61.     compressed files should be PIPed using the [O] option.
  62.  
  63.     A>compress {dev:}filename.ext /switch
  64.  
  65.     /c compress file
  66.     /e expand file
  67.